<!DOCTYPE html>
<html dir="ltr" hasBrowserHandlers="true"><script type="text/javascript;version=1.8" src="js/login.js"></script>
  <head>
   <title>教学日历管理系统</title>
   <meta name="viewport" content="width=device-width" charset="utf-8"/>
		<link rel="stylesheet" href="css/login.css">
			<script>
				function jumpTo(){
					var id=document.getElementsByName("usrid");
					var pwd=document.getElementsByName("pwd");
					if(id==""){
						alert("请输入用户名!");
					}
					else if(pwd==""){
						alert("请输入密码!");
					}

				else{
			  var auth=null;

				var usr1=document.getElementsByName("usr");
				for (var i=0;i<usr1.length;i++){ //遍历Radio
						if(usr1[i].checked){
							auth=usr1[i].value;
							}
						}
				if(auth=="stu"){
				window.open("index.html");
				}
				else if(auth=="teh"){
				window.open("t_ index.html");
				}
				else if(auth=="admin"){
				window.open("#");
				}
				else{
					alert("请选择你的用户类型!");
				}
				}
	 }
			</script>



   <link rel="icon" type="image/png" id="favicon" href="chrome://branding/content/icon32.png" />
		<body > 


  	<div id="cal-logo" class="fade-in-forward" style="opacity: 1;"></div> 

  	<div class="sign-in"><div id="main-content" class="card">
  
  <header>

    <img src="img/日历.png"/>
    <h1 id="fxa-signin-header">
    	
        <!-- L10N: For languages structured like English, the second phrase can read "to continue to %(serviceName)s" -->
        登录 <span class="service">教学日历管理系统</span>
    </h1>
  </header>

  <section>

      <div class="error"></div>
      <div class="success"></div>


        <form novalidate="" action="/users" method="post">
        <div class="input-row">
          <input name="usrid" class="usrid" placeholder="学号" value="" spellcheck="false" autofocus="" type="usrid">
        </div>

        <div class="input-row password-row">
          <input class="password tooltip-below" name="pwd" id="pwd" placeholder="密码" pattern=".{6,}" required="" value="" type="password">
        </div>
        <div>
        	<input name="auth" type="radio" value="1" id="1"/>学生
            <input name="auth" type="radio" value="2" id="2"/>老师
            <input name="auth" type="radio" value="3" id="3"/>管理员
        </div>
            <!--<script type="text/javascript">
                $(function dd() {
                    $.ajax({
                        type: "get",
                        url: "/users",
                        dataType: "json",
                        success: function(result){
                            addBox(result);
                        }
                    });
                });
                function addBox(result) {

                }
            </script>-->
            <div id ="addBox"></div>
        <div class="button-row">
          <button id="submit-btn" type="submit" class="disabled" onclick="jumpTo()">登录</button>
        </div>
      </form>

  </section>
</div>

    <div id="stage" style="display: none;">

      <div id="manage">
        <header>
          <div id="usrid"></div>
        </header>

      </div>

      <div id="userError">
        <header>
          <h1>用户名或密码错误</h1>
        </header>

        <section>
            
            <div class="description">您的用户名或密码错误，请重试。</div>

        </section>
      </div>

    </div>



</div>

</html>